Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation while updating CompatibilityMode setting #13080

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

ltaragi
Copy link
Contributor

@ltaragi ltaragi commented Apr 4, 2024

Description

This PR implements the following two checks while updating the CompatibilityMode setting:

  • Don't allow changing (STRICT <--> MIXED) the CompatibilityMode if all the nodes in the cluster are not of the same open search version
  • Don't allow switching to STRICT mode if the cluster contains both remote and non-remote nodes

This was done as follows:

  • TransportClusterUpdateSettingsAction receives both the ClusterUpdateSettingsRequest and ClusterState
  • The requested new value for CompatibilityMode can be found inside the ClusterUpdateSettingsRequest object
  • Information on nodes like remote store enabled nature and opensearch version can be found inside the ClusterState object
  • validateCompatibilityModeSettingRequest ensures the required checks by in turn calling validateAllNodesOfSameVersion and validateAllNodesOfSameType

Related Issues

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created
    By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Storage:Durability Issues and PRs related to the durability framework Storage:Remote labels Apr 4, 2024
Copy link
Contributor

github-actions bot commented Apr 4, 2024

❌ Gradle check result for 8b05f9d: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Apr 4, 2024

Compatibility status:

Checks if related components are compatible with change 7b1cc3e

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git]

Copy link
Contributor

github-actions bot commented Apr 8, 2024

❌ Gradle check result for 54ab728: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@ltaragi ltaragi force-pushed the strict-mode-switching branch from 54ab728 to 6d434aa Compare April 8, 2024 14:28
Copy link
Contributor

github-actions bot commented Apr 8, 2024

❌ Gradle check result for 6d434aa: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@ltaragi ltaragi force-pushed the strict-mode-switching branch from 6d434aa to 7237a5f Compare April 8, 2024 16:45
Copy link
Contributor

github-actions bot commented Apr 8, 2024

❕ Gradle check result for 7237a5f: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.repositories.azure.AzureBlobContainerRetriesTests.testWriteLargeBlob

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 86.36364% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 71.47%. Comparing base (b15cb0c) to head (7b1cc3e).
Report is 157 commits behind head on main.

Files Patch % Lines
.../java/org/opensearch/snapshots/RestoreService.java 0.00% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13080      +/-   ##
============================================
+ Coverage     71.42%   71.47%   +0.05%     
- Complexity    59978    60547     +569     
============================================
  Files          4985     5033      +48     
  Lines        282275   285009    +2734     
  Branches      40946    41306     +360     
============================================
+ Hits         201603   203699    +2096     
- Misses        63999    64442     +443     
- Partials      16673    16868     +195     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ltaragi added 2 commits April 12, 2024 20:09
Signed-off-by: Lakshya Taragi <[email protected]>
@ltaragi ltaragi force-pushed the strict-mode-switching branch 2 times, most recently from 2c938a8 to 1525c9b Compare April 12, 2024 14:50
Copy link
Contributor

❌ Gradle check result for 1525c9b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Lakshya Taragi <[email protected]>
@ltaragi ltaragi force-pushed the strict-mode-switching branch from 1525c9b to 7b1cc3e Compare April 12, 2024 15:18
Copy link
Contributor

❕ Gradle check result for 2c938a8: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testShardAlreadyReplicating

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Contributor

❕ Gradle check result for 7b1cc3e: UNSTABLE

  • TEST FAILURES:
      3 org.opensearch.cluster.MinimumClusterManagerNodesIT.testThreeNodesNoClusterManagerBlock

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@ltaragi ltaragi marked this pull request as ready for review April 12, 2024 16:31
@ltaragi
Copy link
Contributor Author

ltaragi commented Apr 12, 2024

❕ Gradle check result for 2c938a8: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testShardAlreadyReplicating

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Flaky test #8928

❕ Gradle check result for 7b1cc3e: UNSTABLE

  • TEST FAILURES:
      3 org.opensearch.cluster.MinimumClusterManagerNodesIT.testThreeNodesNoClusterManagerBlock

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Flaky test #10006

@linuxpi
Copy link
Collaborator

linuxpi commented Apr 15, 2024

Overall LGTM. Please add the IT for min/max version check

@gbbafna gbbafna merged commit 695fbde into opensearch-project:main Apr 16, 2024
80 of 85 checks passed
@gbbafna gbbafna added the backport 2.x Backport to 2.x branch label Apr 16, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 16, 2024
Signed-off-by: Lakshya Taragi <[email protected]>
(cherry picked from commit 695fbde)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
gbbafna pushed a commit that referenced this pull request Apr 17, 2024
)

(cherry picked from commit 695fbde)

Signed-off-by: Lakshya Taragi <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch enhancement Enhancement or improvement to existing feature or request skip-changelog Storage:Durability Issues and PRs related to the durability framework Storage:Remote
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Remote Store] Validation while updating CompatibilityMode setting
3 participants